row, col = list(map(int,input().split()))
cnt1 = 0
cnt2 = 0
for i in range(row):
    for j in range(col):
        if i==j:
            cnt1+=(row-i)*(col-j)
        else:
            cnt2+=(row-i)*(col-j)
print(cnt1)
print(cnt2)
